#ifndef _PAGE_ALGO_SECTIONS_H
#define _PAGE_ALGO_SECTIONS_H

/*
  sections.h - Includes definitions for accessing memory in different
  large chunks. In certain tests, 90,000 pages of memory are allocated.

  Divide 90,000 pages into three main chunks:
  => Section 1: Pages 0 - 29,999
  => Section 2: Pages 30,000 - 59,999
  => Section 3: Pages 60,000 - 89,999

  Provides interface for accessing Sections 1, 2, or 3 individually.

 */

#define SHRINK 2000 // In cases where 90,000 pages are divided into
                    // sections, don't access the first or last SHRINK
                    // pages from each section. Allows for more fine
                    // tuning of total number of pages accessed.
/*
  Accesses the first section of pages
 */
void accessFirst() {
  my_access( 0+SHRINK, 30000-SHRINK );
}

/*
  Accesses the second section of pages
 */
void accessSecond() {
  my_access( 30000+SHRINK, 60000-SHRINK );
}

/*
  Accesses the third section of pages
 */
void accessThird() {
  my_access( 60000+SHRINK, 90000-SHRINK );
}

#endif
